﻿<%@ Page Title="Register - Traditional Maltese Cuisine" Language="C#" MasterPageFile="~/MainMasterPage.master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="TraditionalMalteseCuisine.Register" %>
<%@ Register Src="~/UserControls/CalendarControl.ascx" TagPrefix="uc1" TagName="CalendarControl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ValidationSummary ID="vsyValidationSummary" runat="server" HeaderText="Please note that:" CssClass="validation_summary" />
    <asp:Label ID="lblMessage" runat="server" CssClass="successful_message" Visible="false" Text="A confirmation e-mail has been sent" />
    <div id="control_wrapper" style="width: 50%;">
        <table style="width: 100%;">
            <tr><td colspan="3"><div class="title">REGISTER</div></td></tr>
            <tr><td colspan="3">&nbsp;</td></tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblFirstName" runat="server" Text="First Name:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtFirstName" runat="server" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ErrorMessage="First Name field cannot be empty" ControlToValidate="txtFirstName" SetFocusOnError="True" >*</asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblLastName" runat="server" Text="Last Name:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtLastName" runat="server" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvLastName" runat="server" ErrorMessage="Last Name field cannot be empty" ControlToValidate="txtLastName" SetFocusOnError="True" >*</asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblDOB" runat="server" Text="Date of Birth:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><uc1:CalendarControl runat="server" ID="dtpDOB" /></td>
                <td class="middle_left">&nbsp;</td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblGender" runat="server" Text="Gender:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:DropDownList ID="cmbGender" runat="server" CssClass="combobox" >
                    <asp:ListItem>Not Specified</asp:ListItem>
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                    <asp:ListItem>Other</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="middle_left">&nbsp;</td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblProfilePicture" runat="server" Text="Avatar:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:FileUpload ID="uplImageLocation" runat="server" CssClass="textbox" /></td>
                <td class="middle_left"><asp:CustomValidator ID="csvImageLocation" runat="server" ErrorMessage="Please choose a valid image file" ControlToValidate="uplImageLocation">&nbsp;*</asp:CustomValidator></td>
            </tr>
            <tr><td colspan="3">&nbsp;</td></tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblUsername" runat="server" Text="Username:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtUsername" runat="server" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvUsername" runat="server" ErrorMessage="Username field cannot be empty" ControlToValidate="txtUsername" SetFocusOnError="True" >*</asp:RequiredFieldValidator><asp:CustomValidator ID="csvUsernameExists" runat="server" ErrorMessage="Username already exists" ControlToValidate="txtUsername">*</asp:CustomValidator></td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblPassword" runat="server" Text="Password:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtPassword" runat="server" TextMode="Password" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="Password field cannot be empty" ControlToValidate="txtPassword" SetFocusOnError="True" >*</asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblPassword2" runat="server" Text="Re-Type Password:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvPassword2" runat="server" ErrorMessage="Password 2 field cannot be empty" ControlToValidate="txtPassword2" SetFocusOnError="True" >*</asp:RequiredFieldValidator><asp:CompareValidator ID="cfvPasswordsCompare" runat="server" ErrorMessage="Passwords do not match" ControlToCompare="txtPassword" ControlToValidate="txtPassword2">*</asp:CompareValidator></td>
            </tr>
            <tr>
                <td class="middle_right"><asp:Label ID="lblEMail" runat="server" Text="E-Mail:" CssClass="label" /></td>
                <td class="middle_left" style="width: 60%;"><asp:TextBox ID="txtEMail" runat="server" CssClass="textbox" /></td>
                <td class="middle_left"><asp:RequiredFieldValidator ID="rfvEMail" runat="server" ErrorMessage="E-Mail field cannot be empty" ControlToValidate="txtEMail" SetFocusOnError="True" >*</asp:RequiredFieldValidator><asp:CustomValidator ID="csvEMailExists" runat="server" ErrorMessage="E-Mail already exists" ControlToValidate="txtEmail">*</asp:CustomValidator></td>
            </tr>
            <tr><td colspan="3">&nbsp;</td></tr>
            <tr><td colspan="3" class="middle_center" style="width: 50%;"><asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="button" OnClick="btnSubmit_Click" /></td></tr>
            <tr><td colspan="3">&nbsp;</td></tr>
        </table>
    </div>
</asp:Content>
